﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
using DAL;

namespace BLL
{
    public class RatedBLL
    {
        RatedDAL dal = new RatedDAL();
        /// <summary>
        /// 显示评论
        /// </summary>
        /// <returns></returns>
        public pageLibrary<Rated> ShowRated(int pageindex, int pagesize, string Ratedname)
        {
            pageLibrary<Rated> pager = new pageLibrary<Rated>();
            pager.PageIndex = pageindex;
            pager.PageSize = pagesize;
            pager.PageCount = dal.CountRated(Ratedname);
            pager.Data = dal.ShowRated(pageindex, pagesize, Ratedname);
            return pager;
        }
        /// <summary>
        /// 删除评论信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DelRated(int id)
        {
            int dr = dal.DelRated(id);
            return dr;
        }
    }
}
